package org.example.configs;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

@Configuration
public class Appconfig {

    //由spring在启动时，创建 一个Random对象，交给spring管理  => IOC
    @Bean
    public Random r(){
        return new Random();
    }
}